<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="dining_box1">
	<s:set  var="totle" scope="request" value="page.count"/>
	<s:set  var="pageSize" scope="request" value="pageSize"/>
	<tr>
		<td colspan="2">
		<%
			Integer count = (Integer) request.getAttribute("totle");
			Integer pageSize = (Integer) request.getAttribute("pageSize");
		%>
		<pg:pager  url="list.action" items='<%=count.intValue()%>'
			maxPageItems='<%=pageSize.intValue()%>' export="currentPage=pageNumber">
			<pg:param name="function.name" />
			<pg:param name="function.addresss" />
			<pg:index>
	
				<pg:first>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">首页</a>
				</pg:first>
	
				<pg:prev>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">上一页</a>
				</pg:prev>
	
				<pg:pages>
					<%
						if (currentPage == pageNumber) {
					%>
					<font color="red"><%=pageNumber%></font>
					<%
						} else {
					%>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>"><%=pageNumber%></a>
					<%
						}
					%>
				</pg:pages>
	
				<pg:next>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">下一页</a>
				</pg:next>
	
				<pg:last>
					<a href="<%=pageUrl%>&pageNo=<%=pageNumber%>">末页</a>
				</pg:last>
	
			</pg:index>
	
		</pg:pager>
		</td>
		</tr>
	<tr align="center" valign="middle" class="title">
		<td height="24" valign="middle">
			功能名称
		</td>
		<td height="24" valign="middle">
			功能地址
		</td>
		
	</tr>
	<s:iterator value="page.res">
		<tr>
			<td>
				&nbsp;
				<s:property value="name" />
			</td>
			<td>
				&nbsp;
				<s:property value="pwd" />
			</td>
			
			<td>
				&nbsp;
				<s:url id="modifyUrl" namespace="/function"
					action="addOrUpdate!input">
					<s:param name="user.id">
						<s:property value="id" />
					</s:param>
				</s:url>
				<s:url id="viewUrl" namespace="/function"
					action="list!viewFunction">
					<s:param name="article.id">
						<s:property value="id" />
					</s:param>
				</s:url>
				<s:a href='%{modifyUrl}'>修改</s:a>
				<s:a href='%{viewUrl}'>预览</s:a>
			</td>
			
		</tr>
	</s:iterator>
	<tr>
		<td colspan="2" align="center">
			<s:form namespace="/user" action="addOrUpdate!input.action">
				<input type="submit" value="添加新功能"></input>
			</s:form>
		</td>
	</tr>
</table>
</body>
</html>